<template>
  <van-swipe class="my-swipe" @change="onChange" autoplay="3000">
    <van-swipe-item v-for="(v, i) in SwiDataArr" :key="i" @click="next(v)">
      <img :src="v.bannerImg" alt="" />
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    SwiDataArr: {
      default: "",
    },
  },

  methods: {
    onChange(index) {},
    next(v) {
      this.$router.push({ name: "ShopMes", query: { pid: v.pid } });
    },
  },
};
</script>

<style lang="less" scoped>
.my-swipe{
  border-radius: 20px;
  overflow: hidden;
}
.my-swipe .van-swipe-item {
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
  img {
    width: 100%;
    border-radius: 20px;
  }
}
</style>